<?php
require_once 'pear/Spreadsheet/Excel/Writer.php';
class TestController extends Am_Controller
{
    function indexAction()
    {
		$apiNeo = Am_Di::getInstance()->apineo;
		$apiNeo->setAPIFull(1 , 1);
		$apiNeo->setAPIProjectID(Am_Di::getInstance()->config->getAPIProject());
		$data = $apiNeo->getAPIData();

		
	
		
		
		
		$temp = Am_Di::getInstance()->jobTable;
	
		foreach($data as $row)
		{
			
			$data_update = array(
				
				'job_id_server' => $row->id,
				'project_id' => $row->project_id,
				'title' => $row->title,
				'tags' => $row->tags,
				'description' => $row->description,
				'url' => $row->url,
				'status' => $row->status,
				'submitted' => $row->submitted
			);
			$record = $temp->findBy(array("job_id_server" => $row->id));
			
			var_dump($record);
			$temp->update($row->id, $data_update);

		}




    }
}